﻿using Company.IO.Interfaces;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Company.System.IO.IntegrationTests
{
    public partial class DirectoryTest : TestBase<IDirectory>
    {
        private const string _SGetDirectoryInfoMethodName = "GetDirectoryInfo";

        [TestMethod]
        public void GetDirectoryInfo_PathValid_DirectoryInfo()
        {
            //Arrange
            string path = SLocalPath;
            var systemDirectoryInfo = new global::System.IO.DirectoryInfo(path);
            IDirectoryInfo expected = new DirectoryInfo(systemDirectoryInfo);

            //Act
            IDirectoryInfo actual = Directory.GetDirectoryInfo(path);

            //Assert
            Assert.AreEqual(expected, actual);
        }

        [TestMethod]
        public void GetDirectoryInfo_PathNull_ArgumentNullException()
        {
            PathNull_ArgumentNullException(_SGetDirectoryInfoMethodName);
        }

        [TestMethod]
        public void GetDirectoryInfo_PathEmpty_ArgumentException()
        {
            PathEmpty_ArgumentException(_SGetDirectoryInfoMethodName);
        }
    }
}